﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="MainMusica_Ambiente.aspx.cs" Inherits="AcademiaInteligenteWeb.MainMusica_Ambiente" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Musicas da Playlist
    </h1>
    <div id="formulario">
        <table>
            <tr>
                <td>Nome Música:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtMusica" />
                </td>
                <td>Arquivo</td>
                <td>
                    <asp:FileUpload runat="server" ID="fileMusica" />
                </td>
                <td>
                    <asp:Button Text="Salvar" ID="btnSalvar" runat="server" OnClick="btnSalvar_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    Importar de Playlist
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlPlaylist">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button Text="Importar" ID="btnImportar" runat="server" OnClick="btnImportar_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div id="acoes">
        <ul>
            <li class="itemSelected">
                <asp:LinkButton Text="Alterar" ID="lnkAlterar" runat="server" OnClick="lnkAlterar_Click" />
            </li>
            <li class="itemSelected">
                <asp:LinkButton Text="Excluir" ID="lnkExcluir" runat="server" OnClick="lnkExcluir_Click" />
                <asp:HiddenField ID="hfCurrentItem" ClientIDMode="Static" runat="server" />
            </li>
        </ul>
    </div>
    <div id="dados">
        <asp:GridView ID="grdMusicaPlayList" runat="server" AutoGenerateColumns="false" AllowPaging="true">
            <AlternatingRowStyle CssClass="alterningRow" />
            <SelectedRowStyle CssClass="selectedRow" />
            <Columns>
                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="30px">
                    <ItemTemplate>
                        <input type="checkbox" name="chkSelect" class="checkboxGrid" value='<%#Eval("id")%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="musica" HeaderText="Descrição" />
                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Tocada" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="30px">
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# (bool)Eval("tocada") == true ? "Sim" : "Não" %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
